The present invention relates to a switching circuit formed of a monolithic IC.
A circuit diagram of a conventional switching circuit is shown in FIG. 2. This is a circuit diagram illustrating a circuit which is applied when output from a voltage detector 7 connected to an input terminal is used for changing input voltage and which may also be used for generating an interrupt signal when a microcomputer is provided as a load.
Firstly, the general operation of the switching circuit ignoring the interrupt signal generation capability thereof will be explained for simplifying the explanation. V.sub.1 and V.sub.2, which differ from each other, are inputted to input terminals 1 and 2 respectively. The input terminal 1 is connected to an output terminal 5 through a voltage regulator 3 and a switching transistor 4. The outer input terminal 2 is also connected to an output terminal 5 through a switching transistor 6. The switching transistors 4 and 6 are switched alternatively, which switching is conducted by the voltage detector 7. For example, voltages V.sub.1 and V.sub.2 are supplied to the input terminals 1 and 2 respectively and the voltage V.sub.1 activates the voltage detector 7. When V.sub.1 is greater than a predetermined voltage, the output of the voltage detector 7 turns on the switching transistor 4 and turns off the switching transistor 6. In this case, voltage regulated by the voltage regulator 3 is output to the voltage terminal 5. To the contrary, when the voltage V.sub.1 falls to less than a predetermined voltage, the output of the voltage detector 7 inverts and the switching transistor 4 is turned off and the switching transistor 6 is turned on. Consequently, the voltage V.sub.2 is output to the output terminal 5. In other words, voltage is stably supplied from the output terminal 5 regardless of the variation of the input voltage. The switching circuit of the present invention is a switching circuit which activates stably a system such as a microcomputer by means of output from this output terminal.
Next, use of an output signal of the voltage detector 7 as an interrupt signal to a microcomputer will be explained. In a microcomputer of a twin clock mode, a high clock mode and a low clock mode are interchanged with each other by this interrupt signal. In order to change the modes, the voltage at the input terminal 1 is increased so that the output of the voltage detector 7 inverts. With the rise of the voltage, the output of the voltage detector 7 inverts. As a result, the transistor 4 is turned on and the transistor 6 is turned off. Accordingly, voltage at the input terminal 1 is supplied to the output terminal 5. At the same time, the output signal of the voltage detector is also provided at a signal output terminal 17 and supplied to the microcomputer as an interrupt signal.
However, the prior art switching circuit has the following drawbacks. Output voltage from the voltage regulator has a regulated voltage, however since it passes through the switching transistor 4 the voltage drops in accordance with the transistor resistance, and the dropped voltage is output to the output terminal 5. This voltage drop is not constant, but depends on the quantity of current flowing in the switching transistor 4 accompanied by a variation of the current consumed by a load such as a microcomputer, and the resistance value of the transistor which is on. Therefore, the output terminal 5 doesn't always output a constant voltage despite being regulated by the voltage regulator 3. When current flowing in the switching transistor 4 is large, the size of the switching transistor 4 formed on a monolithic IC becomes large so that the price of the monolithic IC becomes expensive.
When the output terminal 5 connects with a load such as a microcomputer, an output signal of the voltage detector 7 is used as a voltage state transmitting signal outputted to a load, particularly, as an interrupt signal to the microcomputer. Namely, in a microcomputer of a twin clock mode, a high clock mode and low clock mode are interchanged by this interrupt signal. However, when voltage of the input terminal 1 increases and the output signal of the voltage detector 7 inverts, the microcomputer is changed to a high clock mode. At the same time, the transistor 4 is turned on, the transistor 6 is turned off, and an output voltage is output from the input terminal 1 to the output terminal 5. However, because of the fact that a condenser 37 exists at least practically at the output terminal 5, the time constant of the output terminal 5 becomes larger than the time constant of the input terminal 1. Thus, despite the fact that inadequate voltage is supplied to the microcomputer connected to the output terminal 5 due to the Lag introduced by the capacitor 37, the microcomputer is changed to a high clock mode. Consequently, the microcomputer connected to the output terminal 5 becomes out of control.
An object of the present invention is to stabilize the output voltage from the output terminal 5 and to reduce a chip size in order to lower costs and prevent the microcomputer from becoming out of control.